﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>影悦后台</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
    <link href="~/Content/ElementUI/element-ui.css" rel="stylesheet" />
</head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<body>
    <script src="~/Scripts/jquery-3.3.1.js"></script>
    <script src="~/Scripts/vue.js"></script>
    <script src="~/Scripts/axios.js"></script>
    <script src="~/Scripts/ElementUI/element-ui.js"></script>
    <div id="Header">
        <el-container>
            <el-header>
                <span>影悦影城后台管理</span>
            </el-header>
            <el-container>
                <el-aside width="200px">

                    <el-menu default-active="2"
                             class="el-menu-vertical-demo"
                            
                             router>
                        <a href="/Home/MovieInfo">
                            <el-menu-item index="">
                                <i class="el-icon-film"></i>
                                <span slot="title">
                                    电影管理
                                </span>
                            </el-menu-item>
                        </a><a href="/Home/HallInfo">
                            <el-menu-item index="3">
                                <i class="el-icon-video-camera-solid"></i>
                                <span slot="title">
                                    影厅管理
                                </span>
                            </el-menu-item>
                        </a><a href="/Home/OrderInfo">
                            <el-menu-item index="4">
                                <i class="el-icon-s-ticket"></i>
                                <span slot="title">
                                    订单管理
                                </span>
                            </el-menu-item>
                        </a>
                        <a href="/Home/Echarts">
                            <el-menu-item index="4">
                                <i class="el-icon-pie-chart"></i>
                                <span slot="title">
                                    数据统计
                                </span>
                            </el-menu-item>
                        </a>
                    </el-menu>

                </el-aside>
                <el-main>
                    @RenderBody()
                </el-main>
            </el-container>
        </el-container>
    </div>
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)
    <script>
        new Vue({
            el: "#Header",
            data() {
                return {
                    LoginName: null,
                    LoginPwd: null
                }
            },
            methods: {
                Login() {
                    axios.post("Login", {
                        LoginName: this.LoginName,
                        LoginPwd: this.LoginPwd
                    }).then(L => {
                        if (L.data == 1) {
                            this.$message({
                                message: '登录成功',
                                type: 'success'
                            });
                            sessionStorage.setItem('User', this.LoginName);
                            window.location.href = "MovieInfo"
                        } else {
                            this.$message({
                                message: '登录失败，请检查用户名或密码',
                                type: 'danger'
                            });
                        }
                    })
                }
            }
        })
       
    </script>
</body>
</html>
